package systemstream;

import java.io.BufferedWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;

/**
 * Created by 5406160@qq.com on LiBoWen 李博闻.
 *
 * @ClassName : SystemOutDemo
 * @Author : 54061
 * @Date: 2022/2/14 15:05
 */
public class SystemOutDemo {
    public static void main(String[] args) throws IOException {
        String str = "这是我要打印的一句话";


        //把字节输出流转换成字符输出流
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));//目标固定 : 控制台

        bw.write(str);
        bw.newLine();
        bw.flush();

        bw.close();
    }
}
